Repository navigation
Add arc, bezier and helix free functions - #2131
Open
DavidMStraub wants to merge 1 commit into
Open
DavidMStraub wants to merge 1 commit into
DavidMStraub wants to merge 1 commit into
Conversation
- arc(p1, p2, p3) and arc(p1, p2, tangent=t) - circle(r, start, end) for arcs from angles - bezier(*pts) - helix(pitch, height, radius, lefthand=False) - validate inputs with explicit ValueError/TypeError
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2131 +/- ##
==========================================
+ Coverage 95.81% 95.85% +0.03%
==========================================
Files 30 30
Lines 9605 9642 +37
Branches 1443 1456 +13
==========================================
+ Hits 9203 9242 +39
+ Misses 247 246 -1
+ Partials 155 154 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds free functions for curves that were previously only available as
Edge/Wireclassmethods, as discussed in #2126.Why this differs from the discussion
The discussion proposed
arc(r, a1, a2)as a thirdarcoverload.multimethodonly dispatches on positional types, so keyword calls (arc(r=1, ...)) and missing arguments failed with an opaqueDispatchError. Instead,arcis a plain function for the point-based arcs, and arcs from radius and angles go tocircle(r, start, end), mirroringEdge.makeCircle(radius, angle1=, angle2=).Decisions to review
arc(p1, p2, p3)andarc(p1, p2, tangent=t)as one plain function; exactly one ofp3/tangentis requiredcircle(r, start=0, end=360): degrees, counterclockwise,start < end <= start + 360helix(pitch, height, radius, lefthand=False): radius (likecircle), not diameter (likecylinder); full-word argument names; returns anEdge, not aWireValueError/TypeError(collinear or coincident points, zero or parallel tangent, non-positive sizes, invalid angle ranges).circle(0)now raises instead of returning a degenerate edgeellipseis unchanged: its angles would be parametric rather than polar, so partial ellipses are left out for now